<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Matplot</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 13/12/2005</div>
    <p>
      <b>Matplot</b> - 2D plot of a matrix using
  colors</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>Matplot(a,[strf,rect,nax])</tt>
      </dd>
      <dd>
        <tt>Matplot(a,&lt;opt_args&gt;)</tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>a</b>
        </tt>: real matrix of size (n1,n2).</li>
      <li>
        <tt>
          <b>&lt;opt_args&gt;</b>
        </tt>: This represents a sequence of statements <tt>
          <b>key1=value1,
          key2=value2</b>
        </tt>,... where <tt>
          <b>key1</b>
        </tt>,
          <tt>
          <b>key2,...</b>
        </tt> can be one of the following:<ul>
          <li>
            <tt>
              <b>rect</b>
            </tt>: sets the bounds of the plot. If this key is given and
                neither <tt>
              <b>frameflag</b>
            </tt> nor <tt>
              <b>strf</b>
            </tt> is given
                then the <tt>
              <b>y</b>
            </tt> character of <tt>
              <b>strf</b>
            </tt> is
                supposed to be <tt>
              <b>7</b>
            </tt>. See below for value.</li>
          <li>
            <tt>
              <b>nax</b>
            </tt>: sets the grids definition. If this key is given and
                neither <tt>
              <b>axesflag</b>
            </tt> nor <tt>
              <b>strf</b>
            </tt> is given
                then the <tt>
              <b>z</b>
            </tt> character of <tt>
              <b>strf</b>
            </tt> is
                supposed to be <tt>
              <b>1</b>
            </tt>. See below for value.</li>
          <li>
            <tt>
              <b>frameflag</b>
            </tt>: specifies how the frame of the plot is computed. The
                value is an integer ranging from 0 to 8. It corresponds to the
                <tt>
              <b>y</b>
            </tt> character of <tt>
              <b>strf</b>
            </tt>. See below.</li>
          <li>
            <tt>
              <b>axesflag</b>
            </tt>: specifies what kind of axes are drawn around the plot.
                The value is an integer ranging from 0 to 5. It corresponds to
                the <tt>
              <b>z</b>
            </tt> character of <tt>
              <b>strf</b>
            </tt>. See
                below.</li>
        </ul>
      </li>
      <li>
        <tt>
          <b>strf</b>
        </tt>: is a string of length 3 <tt>
          <b>"xyz"</b>
        </tt>.<ul>
          <li>
            <tt>
              <b>default</b>
            </tt>The default is <tt>
              <b>"081"</b>
            </tt>.</li>
          <li>
            <tt>
              <b>x</b>
            </tt>: controls the display of captions.<ul>
              <li>
                <tt>
                  <b>x=0</b>
                </tt>: no caption.</li>
              <li>
                <tt>
                  <b>x=1</b>
                </tt>: captions are displayed. They are given by the
                      optional argument <tt>
                  <b>leg</b>
                </tt>.</li>
            </ul>
          </li>
          <li>
            <tt>
              <b>y</b>
            </tt>: controls the computation of the actual coordinate ranges
                from the minimal requested values. Actual ranges can be larger
                than minimal requirements.<ul>
              <li>
                <tt>
                  <b>y=0</b>
                </tt>: no computation, the plot use the previus (or
                      default) scale</li>
              <li>
                <tt>
                  <b>y=1</b>
                </tt>: from the rect arg</li>
              <li>
                <tt>
                  <b>y=2</b>
                </tt>: from the min/max of the x, y datas</li>
              <li>
                <tt>
                  <b>y=3</b>
                </tt>: built for an isometric scale from the rect
                      arg</li>
              <li>
                <tt>
                  <b>y=4</b>
                </tt>: built for an isometric plot from the min/max of
                      the x, y datas</li>
              <li>
                <tt>
                  <b>y=5</b>
                </tt>: enlarged for pretty axes from the rect arg</li>
              <li>
                <tt>
                  <b>y=6</b>
                </tt>: enlarged for pretty axes from the min/max of the
                      x, y datas</li>
              <li>
                <tt>
                  <b>y=7</b>
                </tt>: like y=1 but the previus plot(s) are redrawn to
                      use the new scale</li>
              <li>
                <tt>
                  <b>y=8</b>
                </tt>: like y=2 but the previus plot(s) are redrawn to
                      use the new scale</li>
            </ul>
          </li>
          <li>
            <tt>
              <b>z</b>
            </tt>: controls the display of information on the frame around
                the plot. If axes are requested, the number of tics can be
                specified by the <tt>
              <b>nax</b>
            </tt> optional argument.<ul>
              <li>
                <tt>
                  <b>z=0</b>
                </tt>: nothing is drawn around the plot.</li>
              <li>
                <tt>
                  <b>z=1</b>
                </tt>: axes are drawn, the y=axis is displayed on the
                      left.</li>
              <li>
                <tt>
                  <b>z=2</b>
                </tt>: the plot is surrounded by a box without tics.</li>
              <li>
                <tt>
                  <b>z=3</b>
                </tt>: axes are drawn, the y=axis is displayed on the
                      right.</li>
              <li>
                <tt>
                  <b>z=4</b>
                </tt>: axes are drawn centred in the middle of the frame
                      box.</li>
              <li>
                <tt>
                  <b>z=5</b>
                </tt>: axes are drawn so as to cross at point
                      <tt>
                  <b>(0,0)</b>
                </tt>. If point <tt>
                  <b>(0,0)</b>
                </tt> does not
                      lie inside the frame, axes will not appear on the
                      graph.</li>
            </ul>
          </li>
        </ul>
      </li>
      <li>
        <tt>
          <b>rect</b>
        </tt>: This argument is used when the second character y of argument
          <tt>
          <b>strf</b>
        </tt> is 1, 3 or 5. It is a row vector of size 4 and
          gives the dimension of the frame:
          <tt>
          <b>rect=[xmin,ymin,xmax,ymax]</b>
        </tt>.</li>
      <li>
        <tt>
          <b>nax</b>
        </tt>: This argument is used when the third character z of argument
          <tt>
          <b>strf</b>
        </tt> is 1. It is a row vector with four entries
          <tt>
          <b>[nx,Nx,ny,Ny]</b>
        </tt> where <tt>
          <b>nx</b>
        </tt> (<tt>
          <b>ny</b>
        </tt>)
          is the number of subgraduations on the x (y) axis and
          <tt>
          <b>Nx</b>
        </tt> (<tt>
          <b>Ny</b>
        </tt>) is the number of graduations on
          the x (y) axis.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>The entries of matrix <tt>
        <b>int(a)</b>
      </tt> are used as colormap entries
    in the current colormap. The color associated to <tt>
        <b>a(i,j)</b>
      </tt> is
    used do draw a small square of length 1 with center at location
    <tt>
        <b>(x=j,y=(n1-i+1))</b>
      </tt>.</p>
    <p>Enter the command <tt>
        <b>Matplot()</b>
      </tt> to see a demo.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

Matplot([1 2 3;4 5 6])
clf()
// draw the current colormap 
Matplot((1:xget("lastpattern")))
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="colormap.htm">
        <tt>
          <b>colormap</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="plot2d.htm">
        <tt>
          <b>plot2d</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot1.htm">
        <tt>
          <b>Matplot1</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot_properties.htm">
        <tt>
          <b>Matplot_properties</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>J.Ph.C.</p>
  </body>
</html>
